package com.kumi.core.service.impl;


import com.kumi.core.domain.*;
import com.kumi.core.repository.SiteDao;
import com.kumi.core.service.SiteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

//import com.kumi.core.repository.SiteDao;
//import com.kumi.core.support.Configurable;
//import com.kumi.core.support.DeleteException;
//import org.apache.commons.collections.CollectionUtils;
//import org.apache.commons.io.FileUtils;
//import org.apache.commons.lang3.ArrayUtils;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.data.domain.Sort;
//import org.springframework.data.jpa.domain.Specification;
//import org.springframework.transaction.annotation.Transactional;

/**
 * SiteServiceImpl
 * 
 * @author liufang
 * 
 */

@Service
@Transactional(readOnly = true)
public class SiteServiceImpl implements SiteService {
    @Override
    public List<Site> findList() {
        return null;
    }

    @Override
    public List<Site> findByUserId(Integer userId) {
        return null;
    }

    public Site findByNumber(String number) {
		List<Site> list = dao.findByNumber(number);
		if (!list.isEmpty()) {
			return list.get(0);
		} else {
			return null;
		}
	}
    private SiteService siteService;
    private SiteDao dao;
    @Override
    public Site findByDomain(String domain) {
        return null;
    }

    @Override
    public Site findDefault() {
        return null;
    }

    @Override
    public boolean numberExist(String number) {
        return false;
    }

    @Override
    public Site get(Integer id) {
        return null;
    }

    @Override
    public Site save(Site bean, Integer parentId, Integer orgId, Integer htmlPublishPointId, Integer userId, Site srcSite) {
        return null;
    }

    @Override
    public Site update(Site bean) {
        return null;
    }

    @Override
    public Site update(Site bean, Integer parentId, Integer orgId, Integer htmlPublishPointId) {
        return null;
    }

    @Override
    public void updateCustoms(Site site, Map<String, String> map, Map<String, String> clobMap) {

    }

    @Override
    public Site delete(Integer id) {
        return null;
    }

    @Override
    public Site[] delete(Integer[] ids) {
        return new Site[0];
    }


    @Autowired
    public void setSiteDao(SiteDao dao)
    {this.dao=dao;}

//    @Autowired
//    public void setSiteService(SiteService siteService) {
//        this.siteService = siteService;
//    }
}













